POV-Ray : Newsgroups : povray.binaries.scene-files : Stupid math problem, HELP!!!!! : Stupid math problem, HELP!!!!! Server Time
29 Apr 2024 05:18:25 EDT (-0400)
  Stupid math problem, HELP!!!!!  
From: Mark Palmquist
Date: 9 Feb 1999 21:52:10
Message: <36C0F5C2.400D03A5@earthlink.net>
Trying to use POV to generate columns with x number grooves, forget my
math (to many years ago.....).  this is the code I used but not working,

can someone enlighten me please.  I know it has something to do with the

sin/cos stuff but can't figure it out with the remaining 3 brain cells
in my skull.

// ----------------------------------------
#declare grooves = 36
#declare vector = 360/grooves
#declare groove_now = 1

difference{
  cylinder{  <0,0,0>,  <0,3,0>,  1  pigment {Red}  }
  #while (groove_now <= grooves)
    cylinder{  <sin(vector), -1, cos(vector)>  <sin(vector), 4,
cos(vector)>,  .1  pigment {Blue}  }
    #declare groove_now = groove_now + 1
    #declare vector = vector + 360/grooves
  #end
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.